﻿<div id="js_app_wp__WPID_">

  <div class="feedback-app" style="width:95%">
    Name: <br/>
    <input class="name" style="width:100%" /> <br/>
    Idea:<br/>
    <textarea class="idea" type="text" rows="5" style="width:100%" ></textarea> <br/>
    <hr style="height:2px; color:#dedede" />
    <div style="text-align:right;width:100%">
      <input type="button" value="Submit" class='app-submit ms-ButtonHeightWidth' />
    </div>
  </div>

  <script data-js-app-wp="true">
    <![CDATA[
	        jQuery(document).ready(function () {
	
	            var settings = $appContext;

				      var appContainer = "#" + settings.wpId + " .feedback-app";
				      var appContainerElement = jQuery(appContainer);

				      jQuery(".app-submit", appContainerElement).click(function() {
					
					      var name = jQuery(".name", appContainerElement).val();
					      var idea = jQuery(".idea", appContainerElement).val();					
					
					      alert('name:[' + name  + "] and idea:[" + idea + "] has been submitted!");
				
					      jQuery(".name", appContainerElement).val("");
					      jQuery(".idea", appContainerElement).val("");					
				      });
	        });
        ]]>
  </script>

</div>
